

package com.hazelcast.vector;

import com.hazelcast.spi.annotation.Beta;
import com.hazelcast.vector.impl.SearchOptionsImpl;

import java.util.Map;

/**
 * Vector search options
 *
 * @since 5.5
 */
@Beta
public interface SearchOptions {

    /**
     * @return builder of {@link SearchOptions}
     */
    static SearchOptionsBuilder builder() {
        return new SearchOptionsBuilder();
    }

    static SearchOptions of(int limit, boolean includeValue, boolean includeVectors) {
        return new SearchOptionsImpl(includeValue, includeVectors, limit, Map.of());
    }

    /**
     * @return {@code true} if search results should include the user-supplied value or
     * {@code false} if only keys should be returned.
     */
    boolean isIncludeValue();

    /**
     * @return {@code true} if search results should include the vectors associated with
     * each search result, {@code false} otherwise.
     */
    boolean isIncludeVectors();

    /**
     * @return the number of search results to return
     */
    int getLimit();

    /**
     * @return hints for search execution
     */
    Map<String, String> getHints();

    /**
     * @return SearchOptionsBuilder with the same settings
     * @since 6.0
     */
    SearchOptionsBuilder toBuilder();
}
